<?php
/*
  $Id: boxes.tpl.php,v 1.1.1.1 2004/03/04 23:42:35 ccwjr Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  class tableBox {
    var $table_border = '0';
    var $table_width = '100%';
    var $table_cellspacing = '0';
    var $table_cellpadding = '0';
    var $table_parameters = '';
    var $table_row_parameters = '';
    var $table_data_parameters = '';

// class constructor
    function tableBox($contents, $direct_output = false) {
      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
      $tableBox_string .= '>' . "\n";

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
        $tableBox_string .= '  <tr';
        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
        $tableBox_string .= '>' . "\n";

        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
              $tableBox_string .= '    <td';
              if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
                $tableBox_string .= ' ' . $contents[$i][$x]['params'];
              } elseif (tep_not_null($this->table_data_parameters)) {
                $tableBox_string .= ' ' . $this->table_data_parameters;
              }
              $tableBox_string .= '>';
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
              $tableBox_string .= $contents[$i][$x]['text'];
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
              $tableBox_string .= '</td>' . "\n";
            }
          }
        } else {
          $tableBox_string .= '<td ';
          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
            $tableBox_string .= ' ' . $contents[$i]['params'];
          } elseif (tep_not_null($this->table_data_parameters)) {
            $tableBox_string .= ' ' . $this->table_data_parameters;
          }
          $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n"; 
        }

        $tableBox_string .= '  </tr>' . "\n";
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
      }

      $tableBox_string .= '</table>' . "\n";

      if ($direct_output == true) echo $tableBox_string;

      return $tableBox_string;
    }
  }


    class infoBox extends tableBox {
    function infoBox($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
	  $info_box_contents[] = array('text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="1" height="10" alt="">');
      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      $this->tableBox($info_box_contents, true);
    }

    function infoBoxContents($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      $info_box_contents = array();

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
		  $info_box_contents[] = array( array('params' => 'class="tall-l2"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="10" height="1" alt=""/>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'width="100%"',
										      'text' => '<br style="line-height:15px;" />'.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('params' => 'class="tall-r2"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="10" height="1" alt=""/>'));
	  }
	  
		  $info_box_contents[] = array( array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-bl.gif" ><br>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'class="tall-b"',
										      'text' => '<br style="line-height:10px">'.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-br.gif" ><br>'));

      return $this->tableBox($info_box_contents);
    }
   }
class infoBox2 extends tableBox {
    function infoBox2($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
      $this->table_cellpadding = '0';
      $this->table_parameters = 'class="templateinfoBox" style="vertical-align:top" ';
      $this->tableBox($info_box_contents, true);
    }

    function infoBoxContents($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      $info_box_contents = array();
      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
		  $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										     'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										     'params' => 'width="100%"',
										     'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''));
	  }
      return $this->tableBox($info_box_contents);
    }
   }

    class info_Box extends tableBox {

    function infoBox($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      $this->tableBox($info_box_contents, true);
    }


  function infoBox_Contents($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = ' ';
      $info_box_contents = array();
      $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
		  $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										     'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										     'params' => 'width="100%" class="padding_20"',
										     'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''));
	  }
      return $this->tableBox($info_box_contents);
    }
  }

  class infoBoxHeading extends tableBox {
    function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = true) {
      $this->table_cellpadding = '0';
	  $this->table_parameters = 'class="heading5"';
      $info_box_contents = array();

      $info_box_contents[] = array(array('params' => 'class="tall-l"',
								   		 'text' => '<table width="100%" class="tall-r">
											  <tr>
												<td width="100%" class="k-tl">
													<table width="100%" class="k-tr">
													  <tr>
														<td width="100%" class="heading_text_1">
															' . $contents[0]['text'] . '
														</td>
													  </tr>
													</table>
												</td>
											  </tr>
											</table>'));

      $this->tableBox($info_box_contents, true);
    }
  }

  class contentBoxHeading extends tableBox {
    function contentBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
      $this->table_cellpadding = '0';
	  $this->table_parameters = 'class="cont_header_txt"';
      $info_box_contents = array();
	  
      $info_box_contents[] = array(array('params' => 'width="100%"',
								   		 'text' => '' . $contents[0]['text'] . ''));
										 
      $this->tableBox($info_box_contents, true);
    }
  }

  class contentBox extends tableBox {
    function contentBox($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = '';
	  $info_box_contents = array();
	  
      $info_box_contents[] = array('text' => '
	  			
				<table width="100%" cellpadding="0" cellspacing="0" class="content">
                  <tr>
                    <td width="9" class="tall-l2"><img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" ></td>
                    <td width="100%" class="padding2 product">
                      <table style="width:100%" cellpadding="0" cellspacing="0">
                        <tr>
                          <td>
						  		'.$this->contentBoxContents($contents).'
						  </td>
                        </tr>
                      </table>
                    <td width="9" class="tall-r2"><img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" ></td>
                  </tr>
                  <tr>
                    <td width="9"><img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-bl.gif" ><br></td>
                    <td width="100%" class="tall-b"><img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" ></td>
                    <td width="9"><img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-br.gif" ><br></td>
                  </tr>
                </table>
				
				');
	  
      $this->tableBox($info_box_contents, true);
    }

    function contentBoxContents($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      return $this->tableBox($contents);
    }
  }

  class errorBox extends tableBoxMessagestack {
    function errorBox($contents) {
      $this->table_data_parameters = 'class="errorBox"';
      $this->tableBoxmessagestack($contents, true);
    }
  }

  class productListingBox extends tableBox {
    function productListingBox($contents) {
      $this->table_parameters = 'class="productListing"';
      $this->tableBox($contents, true);
    }
  }


  class infoboxFooter extends tableBox {
    function infoBoxFooter($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {

    }
  }
  
  
  
  
/*------  BOX 1  ------*/

	/*------  HEADING  ------*/
	
  class infoBoxHeading_1 extends tableBox {
    function infoBoxHeading_1($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
      $this->table_cellpadding = '0';
	  $this->table_parameters = 'bgcolor="#f8f8f8"';
      $info_box_contents = array();

      $info_box_contents[] = array( array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-tl.gif" ><br>'),
									array('params' => 'class="tall-t"',
								   		  'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="1" height="1" alt="">'),
									array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-tr.gif" ><br>'));
								   
      $info_box_contents[] = array( array('params' => 'class="tall-l"',
								   		  'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="1" height="1" alt="">'),
									array('params' => 'width="100%" class="heading_text_1"',
								   		  'text' => '' . $contents[0]['text'] . ''),
									array('params' => 'class="tall-r"',
								   		  'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="1" height="1" alt="">'));
								   
      $this->tableBox($info_box_contents, true);
    }
  }

	/*------  CONTENT  ------*/
	
  class infoBox_1 extends tableBox {
    function infoBox_1($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents_1($contents). '<br style="line-height:10px;" />');
      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      $this->tableBox($info_box_contents, true);
    }

    function infoBoxContents_1($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      $info_box_contents = array();

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
		  $info_box_contents[] = array( array('params' => 'class="tall-l2"',
										      'text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-tl2.gif" ><br>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'width="100%" class="tall-t2 padding_box"',
										      'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('params' => 'class="tall-r2"',
										      'text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-tr2.gif" ><br>'));
	  }
	  
		  $info_box_contents[] = array( array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-bl.gif" ><br>'),
										array('params' => 'class="tall-b"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="1" height="1" alt="">'),
										array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-br.gif" ><br>'));

      return $this->tableBox($info_box_contents);
    }
  }
/*---------------------*/



/*------  BOX 2  ------*/

	/*------  HEADING  ------*/
	
  class infoBoxHeading_2 extends tableBox {
    function infoBoxHeading_2($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
      $this->table_cellpadding = '0';
	  $this->table_parameters = 'class="heading"';
      $info_box_contents = array();

      $info_box_contents[] = array(array('params' => 'class="tall-l"',
								   		 'text' => '<table width="100%" class="tall-r">
											  <tr>
												<td width="100%" class="k-tl">
													<table width="100%" class="k-tr">
													  <tr>
														<td width="100%" class="heading_text_1">
															' . $contents[0]['text'] . '
														</td>
													  </tr>
													</table>
												</td>
											  </tr>
											</table>'));
								   
      $this->tableBox($info_box_contents, true);
    }
  }

	/*------  CONTENT  ------*/
	
  class infoBox_2 extends tableBox {
    function infoBox_2($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents_2($contents). '<br style="line-height:10px;" />');
      $this->table_cellpadding = '0';
      $this->table_parameters = 'width="100%"';
      $this->tableBox($info_box_contents, true);
    }

    function infoBoxContents_2($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = 'bgcolor="#e1e92c"';
      $info_box_contents = array();

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
		  $info_box_contents[] = array( array('params' => 'class="tall-l3"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="10" height="1" alt=""/>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'width="100%"',
										      'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('params' => 'class="tall-r3"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="10" height="1" alt=""/>'));
	  }
	  
		  $info_box_contents[] = array( array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-bl3.gif" ><br>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'class="tall-b3"',
										      'text' => '<br style="line-height:10px">'.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-br3.gif" ><br>'));

      return $this->tableBox($info_box_contents);
    }
  }
/*---------------------*/



/*------  BOX 3  ------*/

	/*------  HEADING  ------*/
	
  class infoBoxHeading_3 extends tableBox {
    function infoBoxHeading_3($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
      $this->table_cellpadding = '0';
	  $this->table_parameters = 'class="heading2"';
      $info_box_contents = array();

      $info_box_contents[] = array(array('params' => 'class="tall-l"',
								   		 'text' => '<table width="100%" class="tall-r">
											  <tr>
												<td width="100%" class="k-tl">
													<table width="100%" class="k-tr">
													  <tr>
														<td width="100%" class="heading_text_1">
															' . $contents[0]['text'] . '
														</td>
													  </tr>
													</table>
												</td>
											  </tr>
											</table>'));
								   
      $this->tableBox($info_box_contents, true);
    }
  }

	/*------  CONTENT  ------*/
	
  class infoBox_3 extends tableBox {
    function infoBox_3($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents_3($contents). '<br style="line-height:10px;" />');
      $this->table_cellpadding = '0';
      $this->table_parameters = 'width="100%"';
      $this->tableBox($info_box_contents, true);
    }

    function infoBoxContents_3($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = 'bgcolor="#e2e2e2"';
      $info_box_contents = array();

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
		  $info_box_contents[] = array( array('params' => 'class="tall-l4"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="10" height="1" alt=""/>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'width="100%"',
										      'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('params' => 'class="tall-r4"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="10" height="1" alt=""/>'));
	  }
	  
		  $info_box_contents[] = array( array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-bl4.gif" ><br>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'class="tall-b4"',
										      'text' => '<br style="line-height:10px">'.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-br4.gif" ><br>'));

      return $this->tableBox($info_box_contents);
    }
  }
/*---------------------*/



/*------  BOX 4  ------*/

	/*------  HEADING  ------*/
	
  class infoBoxHeading_4 extends tableBox {
    function infoBoxHeading_4($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
      $this->table_cellpadding = '0';
	  $this->table_parameters = 'class="heading3"';
      $info_box_contents = array();

      $info_box_contents[] = array(array('params' => 'class="tall-l"',
								   		 'text' => '<table width="100%" class="tall-r">
											  <tr>
												<td width="100%" class="k-tl">
													<table width="100%" class="k-tr">
													  <tr>
														<td width="100%" class="heading_text_1">
															' . $contents[0]['text'] . '
														</td>
													  </tr>
													</table>
												</td>
											  </tr>
											</table>'));
								   
      $this->tableBox($info_box_contents, true);
    }
  }

	/*------  CONTENT  ------*/
	
  class infoBox_4 extends tableBox {
    function infoBox_4($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents_4($contents). '<br style="line-height:10px;" />');
      $this->table_cellpadding = '0';
      $this->table_parameters = 'width="100%"';
      $this->tableBox($info_box_contents, true);
    }

    function infoBoxContents_4($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = 'bgcolor="#F0F0F0"';
      $info_box_contents = array();

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
		  $info_box_contents[] = array( array('params' => 'class="tall-l5"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="10" height="1" alt=""/>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'width="100%"',
										      'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('params' => 'class="tall-r5"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="10" height="1" alt=""/>'));
	  }
	  
		  $info_box_contents[] = array( array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-bl5.gif" ><br>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'class="tall-b5"',
										      'text' => '<br style="line-height:10px">'.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-br5.gif" ><br>'));
	  
      return $this->tableBox($info_box_contents);
    }
  }
/*---------------------*/



/*------  BOX 5  ------*/

	/*------  HEADING  ------*/
	
  class infoBoxHeading_5 extends tableBox {
    function infoBoxHeading_5($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
      $this->table_cellpadding = '0';
	  $this->table_parameters = 'class="heading4"';
      $info_box_contents = array();

      $info_box_contents[] = array(array('params' => 'class="tall-l"',
								   		 'text' => '<table width="100%" class="tall-r">
											  <tr>
												<td width="100%" class="k-tl">
													<table width="100%" class="k-tr">
													  <tr>
														<td width="100%" class="heading_text_1">
															' . $contents[0]['text'] . '
														</td>
													  </tr>
													</table>
												</td>
											  </tr>
											</table>'));
								   
      $this->tableBox($info_box_contents, true);
    }
  }

	/*------  CONTENT  ------*/
	
  class infoBox_5 extends tableBox {
    function infoBox_5($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents_5($contents). '<br style="line-height:10px;" />');
      $this->table_cellpadding = '0';
      $this->table_parameters = 'width="100%"';
      $this->tableBox($info_box_contents, true);
    }

    function infoBoxContents_5($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = 'bgcolor="#ffdf08"';
      $info_box_contents = array();

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
		  $info_box_contents[] = array( array('params' => 'class="tall-l6"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="10" height="1" alt=""/>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'width="100%"',
										      'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('params' => 'class="tall-r6"',
										      'text' => '<img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="10" height="1" alt=""/>'));
	  }
	  
		  $info_box_contents[] = array( array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-bl6.gif" ><br>'),
										array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										      'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										      'params' => 'class="tall-b6"',
										      'text' => '<br style="line-height:10px">'.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''),
										array('text' => '<img alt="" src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/k-br6.gif" ><br>'));
	  
      return $this->tableBox($info_box_contents);
    }
  }
/*---------------------*/









/*------  SHOPPING CART CONSTRUCTOR  ------*/

  class PLtableBox {
    var $table_border = '0';
    var $table_width = '100%';
    var $table_cellspacing = '';
    var $table_cellpadding = '0';
    var $table_parameters = '';
    var $table_row_parameters = ' ';
    var $table_data_parameters = '';

// class constructor
    function PLtableBox($contents, $direct_output = false) {
      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="0" cellpadding="0"';
      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
      $tableBox_string .= '>' . "\n";
      $k=0;
		
      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
			if($i>0) {
				
		  $tableBox_string .= '</tr>
		  	
								<tr><td><img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="1" height="10" alt=""/></td></tr>
								<tr>
									<td colspan="4" width="100%" class="line"><img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="1" height="1" alt=""/></td>
								</tr>
								<tr><td><img src="'.DIR_WS_TEMPLATES . TEMPLATE_NAME.'/images/spacer.gif" width="1" height="10" alt=""/></td></tr>

			';
			}

         if($k==0)
         { $tableBox_string .= '<tr  ';}
         else{
          $tableBox_string .= '<tr ';
         }
         $k++;

        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
        $tableBox_string .= '>' . "\n";
			

        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
          $colum=0;
          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {

              if($colum!=0)
               {
               $tableBox_string .= '<td  ';
               }
               else{
               $tableBox_string .= '<td  ';
                }
                $colum++;

             if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
                $tableBox_string .= ' ' . $contents[$i][$x]['params'];
              } elseif (tep_not_null($this->table_data_parameters)) {
                $tableBox_string .= ' ' . $this->table_data_parameters;
              }
              $tableBox_string .= '>';
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
              $tableBox_string .= $contents[$i][$x]['text'];
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
              $tableBox_string .= '</td>' . "\n";
            }
          }
        } else {
          $tableBox_string .= '<td ';
          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
            $tableBox_string .= ' ' . $contents[$i]['params'];
          } elseif (tep_not_null($this->table_data_parameters)) {
            $tableBox_string .= ' ' . $this->table_data_parameters;
          }
          $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n"; 
        }

    
		 
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
      }

		  $tableBox_string .= '';

      $tableBox_string .= '</table>' . "\n";

      if ($direct_output == true) echo $tableBox_string;

      return $tableBox_string;
    }
  }

  class PLBox extends PLtableBox {
    function PLBox($contents) {
      $this->table_parameters = 'class="cart"';
      $this->PLtableBox($contents, true);
    }
  }






?>